﻿using System;
using System.Data;
using Model;
using DBUtility;

namespace DAL
{
     /// <summary>
     /// 数据访问层RESULT_CHASISS_MANUAL_ZJ_DAL
     /// </summary>
     public class RESULT_CHASISS_MANUAL_ZJ_DAL
     {
         public RESULT_CHASISS_MANUAL_ZJ_DAL()
         {
         }


         /// <summary>
         /// 得到最大JCLSH
         /// </summary>
         public string GetMax_JCLSH(string p_strWhere)
         {
             string strResult = "0";
             string strSql = "select max(JCLSH) as m from RESULT_CHASISS_MANUAL_ZJ";

             if(p_strWhere.Trim().Length > 0)
             {
                 strSql += " where " + p_strWhere;
             }

             DataTable dtTemp = new DataTable();
             DbHelper.GetTable(strSql, ref dtTemp);

             if(dtTemp.Rows.Count>0)
             {
                 if(dtTemp.Rows[0]["m"].ToString().Length>0)
                 {
                     strResult = dtTemp.Rows[0]["m"] == DBNull.Value ? "" : dtTemp.Rows[0]["m"].ToString();
                 }
             }

             dtTemp.Dispose();

             return string.Format("{0:D50}", Convert.ToInt32(strResult) + 1);

          }

          /// <summary>
          /// 得到最大JCLSH
          /// </summary>
          public string GetMax_JCLSH()
          {
              return GetMax_JCLSH("");
          }


          /// <summary>
          /// 判断数据是否存在
          /// </summary>
          public bool Exists(string strJCLSH)
          {
               bool bolResult = false;

               if (strJCLSH == null)
               {
                   return false;
               }

               if (strJCLSH.Length == 0)
               {
                   return false;
               }

               string strSql = "";
               strSql += "select count(1) as c from RESULT_CHASISS_MANUAL_ZJ";
               strSql += " where ";
               strSql += " JCLSH='"+ strJCLSH +"'";

               DataTable dtTemp = new DataTable();
               DbHelper.GetTable(strSql, ref dtTemp);

               if (dtTemp.Rows.Count > 0)
               {
                   bolResult = Convert.ToInt32(dtTemp.Rows[0]["c"]) > 0;
               }

               dtTemp.Dispose();

               return bolResult;

          }

          /// <summary>
          /// 获取数据总记录数
          /// </summary>
          public int GetRecordCount(string p_strWhere)
          {
              int intResult=0;

              string strSql = "";
              strSql += "select count(1) as c from RESULT_CHASISS_MANUAL_ZJ";
              if(p_strWhere.Trim().Length > 0)
              {
                 strSql += " where " + p_strWhere;
              }

              DataTable dtTemp = new DataTable();
              DbHelper.GetTable(strSql, ref dtTemp);

              if(dtTemp.Rows.Count>0)
              {
                  intResult=Convert.ToInt32(dtTemp.Rows[0]["c"]);
              }

              dtTemp.Dispose();

              return intResult;
          }

          /// <summary>
          /// 获取数据总记录数
          /// </summary>
          public int GetRecordCount()
          {
              return GetRecordCount("");
          }

          /// <summary>
          /// 获取数据分页总数
           /// </summary>
          public int GetPageCount(string p_strWhere, int p_intPageSize)
          {
              int intResult=0;

              if(p_intPageSize > 0)
              {
                  int intRecordCount = GetRecordCount(p_strWhere);
                  intResult = Convert.ToInt32(Math.Truncate(Convert.ToDecimal(intRecordCount) / Convert.ToDecimal(p_intPageSize)));
                  if (intRecordCount > (intResult * p_intPageSize))
                  {
                       intResult++;
                  }
              }

              if(intResult == 0)
              {
                   intResult++;
              }
              return intResult;
           }

          /// <summary>
          /// 获取数据分页总数
          /// </summary>
          public int GetPageCount(int p_intPageSize)
          {
              return GetPageCount("", p_intPageSize);
          }

          /// <summary>
          /// 添加一条数据 SQL
          /// </summary>
          public string InsertSQL(RESULT_CHASISS_MANUAL_ZJ model)
          {
              string strFieldSQL = "";
              string strValueSQL = "";

              if(model.Changed("ID") == true && model.ID != null)
              {
                   strFieldSQL += ",ID";
                   strValueSQL += "," + model.ID + "";
              }

              if(model.Changed("DPBJJCCS") == true && model.DPBJJCCS != null)
              {
                   strFieldSQL += ",DPBJJCCS";
                   strValueSQL += ",'" + model.DPBJJCCS.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("DTDPJCCS") == true && model.DTDPJCCS != null)
              {
                   strFieldSQL += ",DTDPJCCS";
                   strValueSQL += ",'" + model.DTDPJCCS.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("WGJCJCCS") == true && model.WGJCJCCS != null)
              {
                   strFieldSQL += ",WGJCJCCS";
                   strValueSQL += ",'" + model.WGJCJCCS.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("JCLSH") == true && model.JCLSH != null)
              {
                   strFieldSQL += ",JCLSH";
                   strValueSQL += ",'" + model.JCLSH.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("RGJYBHGX") == true && model.RGJYBHGX != null)
              {
                   strFieldSQL += ",RGJYBHGX";
                   strValueSQL += ",'" + model.RGJYBHGX.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("WGJC_PD") == true && model.WGJC_PD != null)
              {
                   strFieldSQL += ",WGJC_PD";
                   strValueSQL += ",'" + model.WGJC_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("WGJCCZY") == true && model.WGJCCZY != null)
              {
                   strFieldSQL += ",WGJCCZY";
                   strValueSQL += ",'" + model.WGJCCZY.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("WYXRD_PD") == true && model.WYXRD_PD != null)
              {
                   strFieldSQL += ",WYXRD_PD";
                   strValueSQL += ",'" + model.WYXRD_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("WYXRDJYY") == true && model.WYXRDJYY != null)
              {
                   strFieldSQL += ",WYXRDJYY";
                   strValueSQL += ",'" + model.WYXRDJYY.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("ZCGZZD_PD") == true && model.ZCGZZD_PD != null)
              {
                   strFieldSQL += ",ZCGZZD_PD";
                   strValueSQL += ",'" + model.ZCGZZD_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("ZCGZZJYY") == true && model.ZCGZZJYY != null)
              {
                   strFieldSQL += ",ZCGZZJYY";
                   strValueSQL += ",'" + model.ZCGZZJYY.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("DPBJ_PD") == true && model.DPBJ_PD != null)
              {
                   strFieldSQL += ",DPBJ_PD";
                   strValueSQL += ",'" + model.DPBJ_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("DPBJCZY") == true && model.DPBJCZY != null)
              {
                   strFieldSQL += ",DPBJCZY";
                   strValueSQL += ",'" + model.DPBJCZY.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("DTDP_PD") == true && model.DTDP_PD != null)
              {
                   strFieldSQL += ",DTDP_PD";
                   strValueSQL += ",'" + model.DTDP_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("DTDPCZY") == true && model.DTDPCZY != null)
              {
                   strFieldSQL += ",DTDPCZY";
                   strValueSQL += ",'" + model.DTDPCZY.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("CLTZCSJC_PD") == true && model.CLTZCSJC_PD != null)
              {
                   strFieldSQL += ",CLTZCSJC_PD";
                   strValueSQL += ",'" + model.CLTZCSJC_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("CLTZCSJCJYY") == true && model.CLTZCSJCJYY != null)
              {
                   strFieldSQL += ",CLTZCSJCJYY";
                   strValueSQL += ",'" + model.CLTZCSJCJYY.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("AQZZJY_PD") == true && model.AQZZJY_PD != null)
              {
                   strFieldSQL += ",AQZZJY_PD";
                   strValueSQL += ",'" + model.AQZZJY_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("AQZZJYY") == true && model.AQZZJYY != null)
              {
                   strFieldSQL += ",AQZZJYY";
                   strValueSQL += ",'" + model.AQZZJYY.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("LWCX_PD") == true && model.LWCX_PD != null)
              {
                   strFieldSQL += ",LWCX_PD";
                   strValueSQL += ",'" + model.LWCX_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("LWCXJYY") == true && model.LWCXJYY != null)
              {
                   strFieldSQL += ",LWCXJYY";
                   strValueSQL += ",'" + model.LWCXJYY.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("DGJYBHGX") == true && model.DGJYBHGX != null)
              {
                   strFieldSQL += ",DGJYBHGX";
                   strValueSQL += ",'" + model.DGJYBHGX.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("LTHWSD") == true && model.LTHWSD != null)
              {
                   strFieldSQL += ",LTHWSD";
                   strValueSQL += ",'" + model.LTHWSD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("CSYJSS") == true && model.CSYJSS != null)
              {
                   strFieldSQL += ",CSYJSS";
                   strValueSQL += ",'" + model.CSYJSS.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("CSBMTZ") == true && model.CSBMTZ != null)
              {
                   strFieldSQL += ",CSBMTZ";
                   strValueSQL += ",'" + model.CSBMTZ.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("MCBL") == true && model.MCBL != null)
              {
                   strFieldSQL += ",MCBL";
                   strValueSQL += ",'" + model.MCBL.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("DCBWGDC") == true && model.DCBWGDC != null)
              {
                   strFieldSQL += ",DCBWGDC";
                   strValueSQL += ",'" + model.DCBWGDC.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("ZXPZDZYZDL") == true && model.ZXPZDZYZDL != null)
              {
                   strFieldSQL += ",ZXPZDZYZDL";
                   strValueSQL += ",'" + model.ZXPZDZYZDL.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("CXLBGD") == true && model.CXLBGD != null)
              {
                   strFieldSQL += ",CXLBGD";
                   strValueSQL += ",'" + model.CXLBGD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("ZXPZDZYZDL_PD") == true && model.ZXPZDZYZDL_PD != null)
              {
                   strFieldSQL += ",ZXPZDZYZDL_PD";
                   strValueSQL += ",'" + model.ZXPZDZYZDL_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("LTHWSD_PD") == true && model.LTHWSD_PD != null)
              {
                   strFieldSQL += ",LTHWSD_PD";
                   strValueSQL += ",'" + model.LTHWSD_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("MCBL_PD") == true && model.MCBL_PD != null)
              {
                   strFieldSQL += ",MCBL_PD";
                   strValueSQL += ",'" + model.MCBL_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("CSYJSSL_PD") == true && model.CSYJSSL_PD != null)
              {
                   strFieldSQL += ",CSYJSSL_PD";
                   strValueSQL += ",'" + model.CSYJSSL_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("DCBWGDC_PD") == true && model.DCBWGDC_PD != null)
              {
                   strFieldSQL += ",DCBWGDC_PD";
                   strValueSQL += ",'" + model.DCBWGDC_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("CSBMTZ_PD") == true && model.CSBMTZ_PD != null)
              {
                   strFieldSQL += ",CSBMTZ_PD";
                   strValueSQL += ",'" + model.CSBMTZ_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("RGJYBJCX") == true && model.RGJYBJCX != null)
              {
                   strFieldSQL += ",RGJYBJCX";
                   strValueSQL += ",'" + model.RGJYBJCX.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("DGJYBJCX") == true && model.DGJYBJCX != null)
              {
                   strFieldSQL += ",DGJYBJCX";
                   strValueSQL += ",'" + model.DGJYBJCX.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("WYXRD_MS") == true && model.WYXRD_MS != null)
              {
                   strFieldSQL += ",WYXRD_MS";
                   strValueSQL += ",'" + model.WYXRD_MS.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("ZCGZZD_MS") == true && model.ZCGZZD_MS != null)
              {
                   strFieldSQL += ",ZCGZZD_MS";
                   strValueSQL += ",'" + model.ZCGZZD_MS.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("WGJC_MS") == true && model.WGJC_MS != null)
              {
                   strFieldSQL += ",WGJC_MS";
                   strValueSQL += ",'" + model.WGJC_MS.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("DPBJ_MS") == true && model.DPBJ_MS != null)
              {
                   strFieldSQL += ",DPBJ_MS";
                   strValueSQL += ",'" + model.DPBJ_MS.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("YXJC_MS") == true && model.YXJC_MS != null)
              {
                   strFieldSQL += ",YXJC_MS";
                   strValueSQL += ",'" + model.YXJC_MS.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("HCPD_MS") == true && model.HCPD_MS != null)
              {
                   strFieldSQL += ",HCPD_MS";
                   strValueSQL += ",'" + model.HCPD_MS.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("PSZDQ_PD") == true && model.PSZDQ_PD != null)
              {
                   strFieldSQL += ",PSZDQ_PD";
                   strValueSQL += ",'" + model.PSZDQ_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("ZDJXZDTZZZ_PD") == true && model.ZDJXZDTZZZ_PD != null)
              {
                   strFieldSQL += ",ZDJXZDTZZZ_PD";
                   strValueSQL += ",'" + model.ZDJXZDTZZZ_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("YSKQGZHYSFLZZ_PD") == true && model.YSKQGZHYSFLZZ_PD != null)
              {
                   strFieldSQL += ",YSKQGZHYSFLZZ_PD";
                   strValueSQL += ",'" + model.YSKQGZHYSFLZZ_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("XSGNXXZZ_PD") == true && model.XSGNXXZZ_PD != null)
              {
                   strFieldSQL += ",XSGNXXZZ_PD";
                   strValueSQL += ",'" + model.XSGNXXZZ_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("FDJCNZDMHZZ_PD") == true && model.FDJCNZDMHZZ_PD != null)
              {
                   strFieldSQL += ",FDJCNZDMHZZ_PD";
                   strValueSQL += ",'" + model.FDJCNZDMHZZ_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("HSQHQTFZZZ_PD") == true && model.HSQHQTFZZZ_PD != null)
              {
                   strFieldSQL += ",HSQHQTFZZZ_PD";
                   strValueSQL += ",'" + model.HSQHQTFZZZ_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("ZDFBSZZ_PD") == true && model.ZDFBSZZ_PD != null)
              {
                   strFieldSQL += ",ZDFBSZZ_PD";
                   strValueSQL += ",'" + model.ZDFBSZZ_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("ZWXLT_PD") == true && model.ZWXLT_PD != null)
              {
                   strFieldSQL += ",ZWXLT_PD";
                   strValueSQL += ",'" + model.ZWXLT_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("AQD_PD") == true && model.AQD_PD != null)
              {
                   strFieldSQL += ",AQD_PD";
                   strValueSQL += ",'" + model.AQD_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("WXDWXTCZZD_PD") == true && model.WXDWXTCZZD_PD != null)
              {
                   strFieldSQL += ",WXDWXTCZZD_PD";
                   strValueSQL += ",'" + model.WXDWXTCZZD_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("YXJC_PD") == true && model.YXJC_PD != null)
              {
                   strFieldSQL += ",YXJC_PD";
                   strValueSQL += ",'" + model.YXJC_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("HCPD_PD") == true && model.HCPD_PD != null)
              {
                   strFieldSQL += ",HCPD_PD";
                   strValueSQL += ",'" + model.HCPD_PD.ToString().Replace("'","''") + "'";
              }

              string strSql = "";
              strSql += "insert into RESULT_CHASISS_MANUAL_ZJ";
              strSql += "(";
              strSql += strFieldSQL.Substring(1);
              strSql += ")";
              strSql += " values";
              strSql += "(";
              strSql += strValueSQL.Substring(1);
              strSql += ")";

              return strSql;
          }

          /// <summary>
          /// 添加一条数据
          /// </summary>
          public bool Insert(RESULT_CHASISS_MANUAL_ZJ model)
          {
              return DbHelper.ExecuteSql(InsertSQL(model));
          }

          /// <summary>
          /// 修改一条数据 SQL
          /// </summary>
          public string UpdateSQL(RESULT_CHASISS_MANUAL_ZJ model,string strJCLSH)
          {
              string strUpdateSQL = "";

              if(model.Changed("ID") == true && model.ID != null)
              {
                  strUpdateSQL += ",ID=" + model.ID + "";
              }

              if(model.Changed("DPBJJCCS") == true && model.DPBJJCCS != null)
              {
                  strUpdateSQL += ",DPBJJCCS='" + model.DPBJJCCS.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("DTDPJCCS") == true && model.DTDPJCCS != null)
              {
                  strUpdateSQL += ",DTDPJCCS='" + model.DTDPJCCS.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("WGJCJCCS") == true && model.WGJCJCCS != null)
              {
                  strUpdateSQL += ",WGJCJCCS='" + model.WGJCJCCS.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("JCLSH") == true && model.JCLSH != null)
              {
                  strUpdateSQL += ",JCLSH='" + model.JCLSH.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("RGJYBHGX") == true && model.RGJYBHGX != null)
              {
                  strUpdateSQL += ",RGJYBHGX='" + model.RGJYBHGX.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("WGJC_PD") == true && model.WGJC_PD != null)
              {
                  strUpdateSQL += ",WGJC_PD='" + model.WGJC_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("WGJCCZY") == true && model.WGJCCZY != null)
              {
                  strUpdateSQL += ",WGJCCZY='" + model.WGJCCZY.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("WYXRD_PD") == true && model.WYXRD_PD != null)
              {
                  strUpdateSQL += ",WYXRD_PD='" + model.WYXRD_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("WYXRDJYY") == true && model.WYXRDJYY != null)
              {
                  strUpdateSQL += ",WYXRDJYY='" + model.WYXRDJYY.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("ZCGZZD_PD") == true && model.ZCGZZD_PD != null)
              {
                  strUpdateSQL += ",ZCGZZD_PD='" + model.ZCGZZD_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("ZCGZZJYY") == true && model.ZCGZZJYY != null)
              {
                  strUpdateSQL += ",ZCGZZJYY='" + model.ZCGZZJYY.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("DPBJ_PD") == true && model.DPBJ_PD != null)
              {
                  strUpdateSQL += ",DPBJ_PD='" + model.DPBJ_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("DPBJCZY") == true && model.DPBJCZY != null)
              {
                  strUpdateSQL += ",DPBJCZY='" + model.DPBJCZY.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("DTDP_PD") == true && model.DTDP_PD != null)
              {
                  strUpdateSQL += ",DTDP_PD='" + model.DTDP_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("DTDPCZY") == true && model.DTDPCZY != null)
              {
                  strUpdateSQL += ",DTDPCZY='" + model.DTDPCZY.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("CLTZCSJC_PD") == true && model.CLTZCSJC_PD != null)
              {
                  strUpdateSQL += ",CLTZCSJC_PD='" + model.CLTZCSJC_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("CLTZCSJCJYY") == true && model.CLTZCSJCJYY != null)
              {
                  strUpdateSQL += ",CLTZCSJCJYY='" + model.CLTZCSJCJYY.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("AQZZJY_PD") == true && model.AQZZJY_PD != null)
              {
                  strUpdateSQL += ",AQZZJY_PD='" + model.AQZZJY_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("AQZZJYY") == true && model.AQZZJYY != null)
              {
                  strUpdateSQL += ",AQZZJYY='" + model.AQZZJYY.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("LWCX_PD") == true && model.LWCX_PD != null)
              {
                  strUpdateSQL += ",LWCX_PD='" + model.LWCX_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("LWCXJYY") == true && model.LWCXJYY != null)
              {
                  strUpdateSQL += ",LWCXJYY='" + model.LWCXJYY.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("DGJYBHGX") == true && model.DGJYBHGX != null)
              {
                  strUpdateSQL += ",DGJYBHGX='" + model.DGJYBHGX.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("LTHWSD") == true && model.LTHWSD != null)
              {
                  strUpdateSQL += ",LTHWSD='" + model.LTHWSD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("CSYJSS") == true && model.CSYJSS != null)
              {
                  strUpdateSQL += ",CSYJSS='" + model.CSYJSS.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("CSBMTZ") == true && model.CSBMTZ != null)
              {
                  strUpdateSQL += ",CSBMTZ='" + model.CSBMTZ.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("MCBL") == true && model.MCBL != null)
              {
                  strUpdateSQL += ",MCBL='" + model.MCBL.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("DCBWGDC") == true && model.DCBWGDC != null)
              {
                  strUpdateSQL += ",DCBWGDC='" + model.DCBWGDC.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("ZXPZDZYZDL") == true && model.ZXPZDZYZDL != null)
              {
                  strUpdateSQL += ",ZXPZDZYZDL='" + model.ZXPZDZYZDL.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("CXLBGD") == true && model.CXLBGD != null)
              {
                  strUpdateSQL += ",CXLBGD='" + model.CXLBGD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("ZXPZDZYZDL_PD") == true && model.ZXPZDZYZDL_PD != null)
              {
                  strUpdateSQL += ",ZXPZDZYZDL_PD='" + model.ZXPZDZYZDL_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("LTHWSD_PD") == true && model.LTHWSD_PD != null)
              {
                  strUpdateSQL += ",LTHWSD_PD='" + model.LTHWSD_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("MCBL_PD") == true && model.MCBL_PD != null)
              {
                  strUpdateSQL += ",MCBL_PD='" + model.MCBL_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("CSYJSSL_PD") == true && model.CSYJSSL_PD != null)
              {
                  strUpdateSQL += ",CSYJSSL_PD='" + model.CSYJSSL_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("DCBWGDC_PD") == true && model.DCBWGDC_PD != null)
              {
                  strUpdateSQL += ",DCBWGDC_PD='" + model.DCBWGDC_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("CSBMTZ_PD") == true && model.CSBMTZ_PD != null)
              {
                  strUpdateSQL += ",CSBMTZ_PD='" + model.CSBMTZ_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("RGJYBJCX") == true && model.RGJYBJCX != null)
              {
                  strUpdateSQL += ",RGJYBJCX='" + model.RGJYBJCX.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("DGJYBJCX") == true && model.DGJYBJCX != null)
              {
                  strUpdateSQL += ",DGJYBJCX='" + model.DGJYBJCX.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("WYXRD_MS") == true && model.WYXRD_MS != null)
              {
                  strUpdateSQL += ",WYXRD_MS='" + model.WYXRD_MS.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("ZCGZZD_MS") == true && model.ZCGZZD_MS != null)
              {
                  strUpdateSQL += ",ZCGZZD_MS='" + model.ZCGZZD_MS.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("WGJC_MS") == true && model.WGJC_MS != null)
              {
                  strUpdateSQL += ",WGJC_MS='" + model.WGJC_MS.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("DPBJ_MS") == true && model.DPBJ_MS != null)
              {
                  strUpdateSQL += ",DPBJ_MS='" + model.DPBJ_MS.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("YXJC_MS") == true && model.YXJC_MS != null)
              {
                  strUpdateSQL += ",YXJC_MS='" + model.YXJC_MS.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("HCPD_MS") == true && model.HCPD_MS != null)
              {
                  strUpdateSQL += ",HCPD_MS='" + model.HCPD_MS.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("PSZDQ_PD") == true && model.PSZDQ_PD != null)
              {
                  strUpdateSQL += ",PSZDQ_PD='" + model.PSZDQ_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("ZDJXZDTZZZ_PD") == true && model.ZDJXZDTZZZ_PD != null)
              {
                  strUpdateSQL += ",ZDJXZDTZZZ_PD='" + model.ZDJXZDTZZZ_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("YSKQGZHYSFLZZ_PD") == true && model.YSKQGZHYSFLZZ_PD != null)
              {
                  strUpdateSQL += ",YSKQGZHYSFLZZ_PD='" + model.YSKQGZHYSFLZZ_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("XSGNXXZZ_PD") == true && model.XSGNXXZZ_PD != null)
              {
                  strUpdateSQL += ",XSGNXXZZ_PD='" + model.XSGNXXZZ_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("FDJCNZDMHZZ_PD") == true && model.FDJCNZDMHZZ_PD != null)
              {
                  strUpdateSQL += ",FDJCNZDMHZZ_PD='" + model.FDJCNZDMHZZ_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("HSQHQTFZZZ_PD") == true && model.HSQHQTFZZZ_PD != null)
              {
                  strUpdateSQL += ",HSQHQTFZZZ_PD='" + model.HSQHQTFZZZ_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("ZDFBSZZ_PD") == true && model.ZDFBSZZ_PD != null)
              {
                  strUpdateSQL += ",ZDFBSZZ_PD='" + model.ZDFBSZZ_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("ZWXLT_PD") == true && model.ZWXLT_PD != null)
              {
                  strUpdateSQL += ",ZWXLT_PD='" + model.ZWXLT_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("AQD_PD") == true && model.AQD_PD != null)
              {
                  strUpdateSQL += ",AQD_PD='" + model.AQD_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("WXDWXTCZZD_PD") == true && model.WXDWXTCZZD_PD != null)
              {
                  strUpdateSQL += ",WXDWXTCZZD_PD='" + model.WXDWXTCZZD_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("YXJC_PD") == true && model.YXJC_PD != null)
              {
                  strUpdateSQL += ",YXJC_PD='" + model.YXJC_PD.ToString().Replace("'","''") + "'";
              }

              if(model.Changed("HCPD_PD") == true && model.HCPD_PD != null)
              {
                  strUpdateSQL += ",HCPD_PD='" + model.HCPD_PD.ToString().Replace("'","''") + "'";
              }

               string strSql = "";
               strSql += "update RESULT_CHASISS_MANUAL_ZJ set ";
               strSql += strUpdateSQL.Substring(1);
               strSql += " where ";
               strSql += " JCLSH='"+ strJCLSH +"'";

               return strSql;
          }

          /// <summary>
          /// 修改一条数据
          /// </summary>
          public bool Update(RESULT_CHASISS_MANUAL_ZJ model, string strJCLSH)
          {
              return DbHelper.ExecuteSql(UpdateSQL(model, strJCLSH));
          }

          /// <summary>
          /// 修改一个集合 SQL
          /// </summary>
           public string UpdateRangeSQL(RESULT_CHASISS_MANUAL_ZJ model, string p_strWhere)
          {
               string strUpdateSQL = "";

               if(model.Changed("ID") == true && model.ID != null)
               {
                  strUpdateSQL += ",ID=" + model.ID + "";
               }

               if(model.Changed("DPBJJCCS") == true && model.DPBJJCCS != null)
               {
                  strUpdateSQL += ",DPBJJCCS='" + model.DPBJJCCS.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("DTDPJCCS") == true && model.DTDPJCCS != null)
               {
                  strUpdateSQL += ",DTDPJCCS='" + model.DTDPJCCS.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("WGJCJCCS") == true && model.WGJCJCCS != null)
               {
                  strUpdateSQL += ",WGJCJCCS='" + model.WGJCJCCS.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("JCLSH") == true && model.JCLSH != null)
               {
                  strUpdateSQL += ",JCLSH='" + model.JCLSH.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("RGJYBHGX") == true && model.RGJYBHGX != null)
               {
                  strUpdateSQL += ",RGJYBHGX='" + model.RGJYBHGX.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("WGJC_PD") == true && model.WGJC_PD != null)
               {
                  strUpdateSQL += ",WGJC_PD='" + model.WGJC_PD.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("WGJCCZY") == true && model.WGJCCZY != null)
               {
                  strUpdateSQL += ",WGJCCZY='" + model.WGJCCZY.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("WYXRD_PD") == true && model.WYXRD_PD != null)
               {
                  strUpdateSQL += ",WYXRD_PD='" + model.WYXRD_PD.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("WYXRDJYY") == true && model.WYXRDJYY != null)
               {
                  strUpdateSQL += ",WYXRDJYY='" + model.WYXRDJYY.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("ZCGZZD_PD") == true && model.ZCGZZD_PD != null)
               {
                  strUpdateSQL += ",ZCGZZD_PD='" + model.ZCGZZD_PD.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("ZCGZZJYY") == true && model.ZCGZZJYY != null)
               {
                  strUpdateSQL += ",ZCGZZJYY='" + model.ZCGZZJYY.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("DPBJ_PD") == true && model.DPBJ_PD != null)
               {
                  strUpdateSQL += ",DPBJ_PD='" + model.DPBJ_PD.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("DPBJCZY") == true && model.DPBJCZY != null)
               {
                  strUpdateSQL += ",DPBJCZY='" + model.DPBJCZY.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("DTDP_PD") == true && model.DTDP_PD != null)
               {
                  strUpdateSQL += ",DTDP_PD='" + model.DTDP_PD.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("DTDPCZY") == true && model.DTDPCZY != null)
               {
                  strUpdateSQL += ",DTDPCZY='" + model.DTDPCZY.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("CLTZCSJC_PD") == true && model.CLTZCSJC_PD != null)
               {
                  strUpdateSQL += ",CLTZCSJC_PD='" + model.CLTZCSJC_PD.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("CLTZCSJCJYY") == true && model.CLTZCSJCJYY != null)
               {
                  strUpdateSQL += ",CLTZCSJCJYY='" + model.CLTZCSJCJYY.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("AQZZJY_PD") == true && model.AQZZJY_PD != null)
               {
                  strUpdateSQL += ",AQZZJY_PD='" + model.AQZZJY_PD.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("AQZZJYY") == true && model.AQZZJYY != null)
               {
                  strUpdateSQL += ",AQZZJYY='" + model.AQZZJYY.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("LWCX_PD") == true && model.LWCX_PD != null)
               {
                  strUpdateSQL += ",LWCX_PD='" + model.LWCX_PD.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("LWCXJYY") == true && model.LWCXJYY != null)
               {
                  strUpdateSQL += ",LWCXJYY='" + model.LWCXJYY.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("DGJYBHGX") == true && model.DGJYBHGX != null)
               {
                  strUpdateSQL += ",DGJYBHGX='" + model.DGJYBHGX.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("LTHWSD") == true && model.LTHWSD != null)
               {
                  strUpdateSQL += ",LTHWSD='" + model.LTHWSD.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("CSYJSS") == true && model.CSYJSS != null)
               {
                  strUpdateSQL += ",CSYJSS='" + model.CSYJSS.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("CSBMTZ") == true && model.CSBMTZ != null)
               {
                  strUpdateSQL += ",CSBMTZ='" + model.CSBMTZ.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("MCBL") == true && model.MCBL != null)
               {
                  strUpdateSQL += ",MCBL='" + model.MCBL.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("DCBWGDC") == true && model.DCBWGDC != null)
               {
                  strUpdateSQL += ",DCBWGDC='" + model.DCBWGDC.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("ZXPZDZYZDL") == true && model.ZXPZDZYZDL != null)
               {
                  strUpdateSQL += ",ZXPZDZYZDL='" + model.ZXPZDZYZDL.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("CXLBGD") == true && model.CXLBGD != null)
               {
                  strUpdateSQL += ",CXLBGD='" + model.CXLBGD.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("ZXPZDZYZDL_PD") == true && model.ZXPZDZYZDL_PD != null)
               {
                  strUpdateSQL += ",ZXPZDZYZDL_PD='" + model.ZXPZDZYZDL_PD.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("LTHWSD_PD") == true && model.LTHWSD_PD != null)
               {
                  strUpdateSQL += ",LTHWSD_PD='" + model.LTHWSD_PD.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("MCBL_PD") == true && model.MCBL_PD != null)
               {
                  strUpdateSQL += ",MCBL_PD='" + model.MCBL_PD.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("CSYJSSL_PD") == true && model.CSYJSSL_PD != null)
               {
                  strUpdateSQL += ",CSYJSSL_PD='" + model.CSYJSSL_PD.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("DCBWGDC_PD") == true && model.DCBWGDC_PD != null)
               {
                  strUpdateSQL += ",DCBWGDC_PD='" + model.DCBWGDC_PD.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("CSBMTZ_PD") == true && model.CSBMTZ_PD != null)
               {
                  strUpdateSQL += ",CSBMTZ_PD='" + model.CSBMTZ_PD.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("RGJYBJCX") == true && model.RGJYBJCX != null)
               {
                  strUpdateSQL += ",RGJYBJCX='" + model.RGJYBJCX.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("DGJYBJCX") == true && model.DGJYBJCX != null)
               {
                  strUpdateSQL += ",DGJYBJCX='" + model.DGJYBJCX.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("WYXRD_MS") == true && model.WYXRD_MS != null)
               {
                  strUpdateSQL += ",WYXRD_MS='" + model.WYXRD_MS.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("ZCGZZD_MS") == true && model.ZCGZZD_MS != null)
               {
                  strUpdateSQL += ",ZCGZZD_MS='" + model.ZCGZZD_MS.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("WGJC_MS") == true && model.WGJC_MS != null)
               {
                  strUpdateSQL += ",WGJC_MS='" + model.WGJC_MS.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("DPBJ_MS") == true && model.DPBJ_MS != null)
               {
                  strUpdateSQL += ",DPBJ_MS='" + model.DPBJ_MS.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("YXJC_MS") == true && model.YXJC_MS != null)
               {
                  strUpdateSQL += ",YXJC_MS='" + model.YXJC_MS.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("HCPD_MS") == true && model.HCPD_MS != null)
               {
                  strUpdateSQL += ",HCPD_MS='" + model.HCPD_MS.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("PSZDQ_PD") == true && model.PSZDQ_PD != null)
               {
                  strUpdateSQL += ",PSZDQ_PD='" + model.PSZDQ_PD.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("ZDJXZDTZZZ_PD") == true && model.ZDJXZDTZZZ_PD != null)
               {
                  strUpdateSQL += ",ZDJXZDTZZZ_PD='" + model.ZDJXZDTZZZ_PD.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("YSKQGZHYSFLZZ_PD") == true && model.YSKQGZHYSFLZZ_PD != null)
               {
                  strUpdateSQL += ",YSKQGZHYSFLZZ_PD='" + model.YSKQGZHYSFLZZ_PD.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("XSGNXXZZ_PD") == true && model.XSGNXXZZ_PD != null)
               {
                  strUpdateSQL += ",XSGNXXZZ_PD='" + model.XSGNXXZZ_PD.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("FDJCNZDMHZZ_PD") == true && model.FDJCNZDMHZZ_PD != null)
               {
                  strUpdateSQL += ",FDJCNZDMHZZ_PD='" + model.FDJCNZDMHZZ_PD.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("HSQHQTFZZZ_PD") == true && model.HSQHQTFZZZ_PD != null)
               {
                  strUpdateSQL += ",HSQHQTFZZZ_PD='" + model.HSQHQTFZZZ_PD.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("ZDFBSZZ_PD") == true && model.ZDFBSZZ_PD != null)
               {
                  strUpdateSQL += ",ZDFBSZZ_PD='" + model.ZDFBSZZ_PD.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("ZWXLT_PD") == true && model.ZWXLT_PD != null)
               {
                  strUpdateSQL += ",ZWXLT_PD='" + model.ZWXLT_PD.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("AQD_PD") == true && model.AQD_PD != null)
               {
                  strUpdateSQL += ",AQD_PD='" + model.AQD_PD.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("WXDWXTCZZD_PD") == true && model.WXDWXTCZZD_PD != null)
               {
                  strUpdateSQL += ",WXDWXTCZZD_PD='" + model.WXDWXTCZZD_PD.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("YXJC_PD") == true && model.YXJC_PD != null)
               {
                  strUpdateSQL += ",YXJC_PD='" + model.YXJC_PD.ToString().Replace("'","''") + "'";
               }

               if(model.Changed("HCPD_PD") == true && model.HCPD_PD != null)
               {
                  strUpdateSQL += ",HCPD_PD='" + model.HCPD_PD.ToString().Replace("'","''") + "'";
               }

              string strSql = "";
              strSql += "update RESULT_CHASISS_MANUAL_ZJ set ";
              strSql += strUpdateSQL.Substring(1);
              strSql += " where " + p_strWhere;

              return strSql;
          }

          /// <summary>
          /// 修改一个集合
          /// </summary>
          public bool UpdateRange(RESULT_CHASISS_MANUAL_ZJ model, string p_strWhere)
          {
              return DbHelper.ExecuteSql(UpdateRangeSQL(model, p_strWhere));
          }

          /// <summary>
          /// 修改全部数据 SQL
          /// </summary>
          public string UpdateAllSQL(RESULT_CHASISS_MANUAL_ZJ model)
          {
              string strUpdateSQL = "";

                  strUpdateSQL += ",ID=" + model.ID + "";
                  strUpdateSQL += ",DPBJJCCS='" + model.DPBJJCCS.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",DTDPJCCS='" + model.DTDPJCCS.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",WGJCJCCS='" + model.WGJCJCCS.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",JCLSH='" + model.JCLSH.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",RGJYBHGX='" + model.RGJYBHGX.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",WGJC_PD='" + model.WGJC_PD.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",WGJCCZY='" + model.WGJCCZY.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",WYXRD_PD='" + model.WYXRD_PD.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",WYXRDJYY='" + model.WYXRDJYY.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",ZCGZZD_PD='" + model.ZCGZZD_PD.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",ZCGZZJYY='" + model.ZCGZZJYY.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",DPBJ_PD='" + model.DPBJ_PD.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",DPBJCZY='" + model.DPBJCZY.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",DTDP_PD='" + model.DTDP_PD.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",DTDPCZY='" + model.DTDPCZY.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",CLTZCSJC_PD='" + model.CLTZCSJC_PD.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",CLTZCSJCJYY='" + model.CLTZCSJCJYY.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",AQZZJY_PD='" + model.AQZZJY_PD.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",AQZZJYY='" + model.AQZZJYY.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",LWCX_PD='" + model.LWCX_PD.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",LWCXJYY='" + model.LWCXJYY.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",DGJYBHGX='" + model.DGJYBHGX.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",LTHWSD='" + model.LTHWSD.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",CSYJSS='" + model.CSYJSS.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",CSBMTZ='" + model.CSBMTZ.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",MCBL='" + model.MCBL.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",DCBWGDC='" + model.DCBWGDC.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",ZXPZDZYZDL='" + model.ZXPZDZYZDL.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",CXLBGD='" + model.CXLBGD.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",ZXPZDZYZDL_PD='" + model.ZXPZDZYZDL_PD.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",LTHWSD_PD='" + model.LTHWSD_PD.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",MCBL_PD='" + model.MCBL_PD.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",CSYJSSL_PD='" + model.CSYJSSL_PD.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",DCBWGDC_PD='" + model.DCBWGDC_PD.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",CSBMTZ_PD='" + model.CSBMTZ_PD.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",RGJYBJCX='" + model.RGJYBJCX.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",DGJYBJCX='" + model.DGJYBJCX.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",WYXRD_MS='" + model.WYXRD_MS.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",ZCGZZD_MS='" + model.ZCGZZD_MS.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",WGJC_MS='" + model.WGJC_MS.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",DPBJ_MS='" + model.DPBJ_MS.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",YXJC_MS='" + model.YXJC_MS.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",HCPD_MS='" + model.HCPD_MS.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",PSZDQ_PD='" + model.PSZDQ_PD.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",ZDJXZDTZZZ_PD='" + model.ZDJXZDTZZZ_PD.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",YSKQGZHYSFLZZ_PD='" + model.YSKQGZHYSFLZZ_PD.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",XSGNXXZZ_PD='" + model.XSGNXXZZ_PD.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",FDJCNZDMHZZ_PD='" + model.FDJCNZDMHZZ_PD.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",HSQHQTFZZZ_PD='" + model.HSQHQTFZZZ_PD.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",ZDFBSZZ_PD='" + model.ZDFBSZZ_PD.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",ZWXLT_PD='" + model.ZWXLT_PD.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",AQD_PD='" + model.AQD_PD.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",WXDWXTCZZD_PD='" + model.WXDWXTCZZD_PD.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",YXJC_PD='" + model.YXJC_PD.ToString().Replace("'","''") + "'";
                  strUpdateSQL += ",HCPD_PD='" + model.HCPD_PD.ToString().Replace("'","''") + "'";


               string strSql = "";
               strSql += "update RESULT_CHASISS_MANUAL_ZJ set ";
               strSql += strUpdateSQL.Substring(1);

               return strSql;

          }

          /// <summary>
          /// 修改全部数据
          /// </summary>
          public bool UpdateAll(RESULT_CHASISS_MANUAL_ZJ model)
          {
              return DbHelper.ExecuteSql(UpdateAllSQL(model));
          }

          /// <summary>
          /// 删除一条数据 SQL
          /// </summary>
          public string DeleteSQL(string strJCLSH)
          {
              string strSql = "";
              strSql += "delete from RESULT_CHASISS_MANUAL_ZJ";
              strSql += " where ";
               strSql += " JCLSH='"+ strJCLSH +"'";

              return strSql;

          }

          /// <summary>
          /// 删除一条数据
          /// </summary>
          public bool Delete(string strJCLSH)
          {
              return DbHelper.ExecuteSql(DeleteSQL(strJCLSH));
          }

          /// <summary>
          /// 删除一个集合 SQL
          /// </summary>
          public string DeleteRangeSQL(string p_strWhere)
          {
              string strSql = "";
              strSql += "delete from RESULT_CHASISS_MANUAL_ZJ";
              strSql += " where " + p_strWhere;

              return strSql;
           }

          /// <summary>
          /// 删除一个集合
          /// </summary>
          public bool DeleteRange(string p_strWhere)
          {
              return DbHelper.ExecuteSql(DeleteRangeSQL(p_strWhere));
          }

          /// <summary>
          /// 删除全部 SQL
          /// </summary>
          public string DeleteAllSQL()
          {
              string strSql = "";
              strSql += "delete from RESULT_CHASISS_MANUAL_ZJ";

              return strSql;
           }

         /// <summary>
         /// 删除全部
         /// </summary>
         public bool DeleteAll()
         {
             return DbHelper.ExecuteSql(DeleteAllSQL());
         }

          /// <summary>
         /// 得到一个对象实体
         /// </summary>
         public RESULT_CHASISS_MANUAL_ZJ GetModel(string strJCLSH)
         {
             string strSql = "";
             strSql += "select * from RESULT_CHASISS_MANUAL_ZJ";
             strSql += " where ";
               strSql += " JCLSH='"+ strJCLSH +"'";

             DataTable dtTemp = new DataTable();
             DbHelper.GetTable(strSql, ref dtTemp);

             RESULT_CHASISS_MANUAL_ZJ model = new RESULT_CHASISS_MANUAL_ZJ();

             if(dtTemp.Rows.Count>0)
             {
                 model = new RESULT_CHASISS_MANUAL_ZJ();

                 model.ID = dtTemp.Rows[0]["ID"] == DBNull.Value ? 0 : Convert.ToInt32(dtTemp.Rows[0]["ID"]);
                 model.DPBJJCCS = dtTemp.Rows[0]["DPBJJCCS"] == DBNull.Value ? "" : dtTemp.Rows[0]["DPBJJCCS"].ToString();
                 model.DTDPJCCS = dtTemp.Rows[0]["DTDPJCCS"] == DBNull.Value ? "" : dtTemp.Rows[0]["DTDPJCCS"].ToString();
                 model.WGJCJCCS = dtTemp.Rows[0]["WGJCJCCS"] == DBNull.Value ? "" : dtTemp.Rows[0]["WGJCJCCS"].ToString();
                 model.JCLSH = dtTemp.Rows[0]["JCLSH"] == DBNull.Value ? "" : dtTemp.Rows[0]["JCLSH"].ToString();
                 model.RGJYBHGX = dtTemp.Rows[0]["RGJYBHGX"] == DBNull.Value ? "" : dtTemp.Rows[0]["RGJYBHGX"].ToString();
                 model.WGJC_PD = dtTemp.Rows[0]["WGJC_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["WGJC_PD"].ToString();
                 model.WGJCCZY = dtTemp.Rows[0]["WGJCCZY"] == DBNull.Value ? "" : dtTemp.Rows[0]["WGJCCZY"].ToString();
                 model.WYXRD_PD = dtTemp.Rows[0]["WYXRD_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["WYXRD_PD"].ToString();
                 model.WYXRDJYY = dtTemp.Rows[0]["WYXRDJYY"] == DBNull.Value ? "" : dtTemp.Rows[0]["WYXRDJYY"].ToString();
                 model.ZCGZZD_PD = dtTemp.Rows[0]["ZCGZZD_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["ZCGZZD_PD"].ToString();
                 model.ZCGZZJYY = dtTemp.Rows[0]["ZCGZZJYY"] == DBNull.Value ? "" : dtTemp.Rows[0]["ZCGZZJYY"].ToString();
                 model.DPBJ_PD = dtTemp.Rows[0]["DPBJ_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["DPBJ_PD"].ToString();
                 model.DPBJCZY = dtTemp.Rows[0]["DPBJCZY"] == DBNull.Value ? "" : dtTemp.Rows[0]["DPBJCZY"].ToString();
                 model.DTDP_PD = dtTemp.Rows[0]["DTDP_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["DTDP_PD"].ToString();
                 model.DTDPCZY = dtTemp.Rows[0]["DTDPCZY"] == DBNull.Value ? "" : dtTemp.Rows[0]["DTDPCZY"].ToString();
                 model.CLTZCSJC_PD = dtTemp.Rows[0]["CLTZCSJC_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["CLTZCSJC_PD"].ToString();
                 model.CLTZCSJCJYY = dtTemp.Rows[0]["CLTZCSJCJYY"] == DBNull.Value ? "" : dtTemp.Rows[0]["CLTZCSJCJYY"].ToString();
                 model.AQZZJY_PD = dtTemp.Rows[0]["AQZZJY_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["AQZZJY_PD"].ToString();
                 model.AQZZJYY = dtTemp.Rows[0]["AQZZJYY"] == DBNull.Value ? "" : dtTemp.Rows[0]["AQZZJYY"].ToString();
                 model.LWCX_PD = dtTemp.Rows[0]["LWCX_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["LWCX_PD"].ToString();
                 model.LWCXJYY = dtTemp.Rows[0]["LWCXJYY"] == DBNull.Value ? "" : dtTemp.Rows[0]["LWCXJYY"].ToString();
                 model.DGJYBHGX = dtTemp.Rows[0]["DGJYBHGX"] == DBNull.Value ? "" : dtTemp.Rows[0]["DGJYBHGX"].ToString();
                 model.LTHWSD = dtTemp.Rows[0]["LTHWSD"] == DBNull.Value ? "" : dtTemp.Rows[0]["LTHWSD"].ToString();
                 model.CSYJSS = dtTemp.Rows[0]["CSYJSS"] == DBNull.Value ? "" : dtTemp.Rows[0]["CSYJSS"].ToString();
                 model.CSBMTZ = dtTemp.Rows[0]["CSBMTZ"] == DBNull.Value ? "" : dtTemp.Rows[0]["CSBMTZ"].ToString();
                 model.MCBL = dtTemp.Rows[0]["MCBL"] == DBNull.Value ? "" : dtTemp.Rows[0]["MCBL"].ToString();
                 model.DCBWGDC = dtTemp.Rows[0]["DCBWGDC"] == DBNull.Value ? "" : dtTemp.Rows[0]["DCBWGDC"].ToString();
                 model.ZXPZDZYZDL = dtTemp.Rows[0]["ZXPZDZYZDL"] == DBNull.Value ? "" : dtTemp.Rows[0]["ZXPZDZYZDL"].ToString();
                 model.CXLBGD = dtTemp.Rows[0]["CXLBGD"] == DBNull.Value ? "" : dtTemp.Rows[0]["CXLBGD"].ToString();
                 model.ZXPZDZYZDL_PD = dtTemp.Rows[0]["ZXPZDZYZDL_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["ZXPZDZYZDL_PD"].ToString();
                 model.LTHWSD_PD = dtTemp.Rows[0]["LTHWSD_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["LTHWSD_PD"].ToString();
                 model.MCBL_PD = dtTemp.Rows[0]["MCBL_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["MCBL_PD"].ToString();
                 model.CSYJSSL_PD = dtTemp.Rows[0]["CSYJSSL_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["CSYJSSL_PD"].ToString();
                 model.DCBWGDC_PD = dtTemp.Rows[0]["DCBWGDC_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["DCBWGDC_PD"].ToString();
                 model.CSBMTZ_PD = dtTemp.Rows[0]["CSBMTZ_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["CSBMTZ_PD"].ToString();
                 model.RGJYBJCX = dtTemp.Rows[0]["RGJYBJCX"] == DBNull.Value ? "" : dtTemp.Rows[0]["RGJYBJCX"].ToString();
                 model.DGJYBJCX = dtTemp.Rows[0]["DGJYBJCX"] == DBNull.Value ? "" : dtTemp.Rows[0]["DGJYBJCX"].ToString();
                 model.WYXRD_MS = dtTemp.Rows[0]["WYXRD_MS"] == DBNull.Value ? "" : dtTemp.Rows[0]["WYXRD_MS"].ToString();
                 model.ZCGZZD_MS = dtTemp.Rows[0]["ZCGZZD_MS"] == DBNull.Value ? "" : dtTemp.Rows[0]["ZCGZZD_MS"].ToString();
                 model.WGJC_MS = dtTemp.Rows[0]["WGJC_MS"] == DBNull.Value ? "" : dtTemp.Rows[0]["WGJC_MS"].ToString();
                 model.DPBJ_MS = dtTemp.Rows[0]["DPBJ_MS"] == DBNull.Value ? "" : dtTemp.Rows[0]["DPBJ_MS"].ToString();
                 model.YXJC_MS = dtTemp.Rows[0]["YXJC_MS"] == DBNull.Value ? "" : dtTemp.Rows[0]["YXJC_MS"].ToString();
                 model.HCPD_MS = dtTemp.Rows[0]["HCPD_MS"] == DBNull.Value ? "" : dtTemp.Rows[0]["HCPD_MS"].ToString();
                 model.PSZDQ_PD = dtTemp.Rows[0]["PSZDQ_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["PSZDQ_PD"].ToString();
                 model.ZDJXZDTZZZ_PD = dtTemp.Rows[0]["ZDJXZDTZZZ_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["ZDJXZDTZZZ_PD"].ToString();
                 model.YSKQGZHYSFLZZ_PD = dtTemp.Rows[0]["YSKQGZHYSFLZZ_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["YSKQGZHYSFLZZ_PD"].ToString();
                 model.XSGNXXZZ_PD = dtTemp.Rows[0]["XSGNXXZZ_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["XSGNXXZZ_PD"].ToString();
                 model.FDJCNZDMHZZ_PD = dtTemp.Rows[0]["FDJCNZDMHZZ_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["FDJCNZDMHZZ_PD"].ToString();
                 model.HSQHQTFZZZ_PD = dtTemp.Rows[0]["HSQHQTFZZZ_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["HSQHQTFZZZ_PD"].ToString();
                 model.ZDFBSZZ_PD = dtTemp.Rows[0]["ZDFBSZZ_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["ZDFBSZZ_PD"].ToString();
                 model.ZWXLT_PD = dtTemp.Rows[0]["ZWXLT_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["ZWXLT_PD"].ToString();
                 model.AQD_PD = dtTemp.Rows[0]["AQD_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["AQD_PD"].ToString();
                 model.WXDWXTCZZD_PD = dtTemp.Rows[0]["WXDWXTCZZD_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["WXDWXTCZZD_PD"].ToString();
                 model.YXJC_PD = dtTemp.Rows[0]["YXJC_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["YXJC_PD"].ToString();
                 model.HCPD_PD = dtTemp.Rows[0]["HCPD_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["HCPD_PD"].ToString();
             }

             dtTemp.Dispose();

             return model;
         }

         /// <summary>
         /// 得到一个对象实体
         /// </summary>
         public void GetModel(ref DataTable p_dtData, string strJCLSH)
         {
             p_dtData.Clear();

             string strSql = "";
             strSql += "select * from RESULT_CHASISS_MANUAL_ZJ";
             strSql += " where ";
               strSql += " JCLSH='"+ strJCLSH +"'";

              DbHelper.GetTable(strSql, ref p_dtData);
         }

      /// <summary>
      /// 得到对象集合
      /// </summary>
      public RESULT_CHASISS_MANUAL_ZJ[] GetModelList(string p_strWhere, string p_strOrder, int p_intPageNumber, int p_intPageSize)
      {
          int m_intPageNumber = p_intPageNumber;
          int m_intPageCount = GetPageCount(p_strWhere, p_intPageSize);

          if((m_intPageNumber < 1) || (m_intPageNumber == 0))
          {
               m_intPageNumber = 1;
          }

          if(m_intPageNumber == -1)
          {
               m_intPageNumber = m_intPageCount;
          }

          if(m_intPageNumber > m_intPageCount)
          {
               m_intPageNumber = m_intPageCount;
          }

          string strSql = "";
          strSql += "select * from RESULT_CHASISS_MANUAL_ZJ";
          if(p_strWhere.Trim().Length > 0)
          {
               strSql += " where " + p_strWhere;
          }
          if(p_strOrder.Trim().Length > 0)
          {
               strSql += " order by " + p_strOrder;
          }

          DataTable dtTemp = new DataTable();

          if(p_intPageSize > 0)
          {
               DbHelper.GetTable(strSql, ref dtTemp, (m_intPageNumber-1)*p_intPageSize, p_intPageSize);
          }
          else
          {
               DbHelper.GetTable(strSql, ref dtTemp);
          }

          RESULT_CHASISS_MANUAL_ZJ[] arrModel=new RESULT_CHASISS_MANUAL_ZJ[dtTemp.Rows.Count];

          for(int N=0;N<dtTemp.Rows.Count;N++)
          {
               arrModel[N] = new RESULT_CHASISS_MANUAL_ZJ();

                 arrModel[N].ID = dtTemp.Rows[N]["ID"] == DBNull.Value ? 0 : Convert.ToInt32(dtTemp.Rows[N]["ID"]);
                 arrModel[N].DPBJJCCS = dtTemp.Rows[N]["DPBJJCCS"] == DBNull.Value ? "" : dtTemp.Rows[N]["DPBJJCCS"].ToString();
                 arrModel[N].DTDPJCCS = dtTemp.Rows[N]["DTDPJCCS"] == DBNull.Value ? "" : dtTemp.Rows[N]["DTDPJCCS"].ToString();
                 arrModel[N].WGJCJCCS = dtTemp.Rows[N]["WGJCJCCS"] == DBNull.Value ? "" : dtTemp.Rows[N]["WGJCJCCS"].ToString();
                 arrModel[N].JCLSH = dtTemp.Rows[N]["JCLSH"] == DBNull.Value ? "" : dtTemp.Rows[N]["JCLSH"].ToString();
                 arrModel[N].RGJYBHGX = dtTemp.Rows[N]["RGJYBHGX"] == DBNull.Value ? "" : dtTemp.Rows[N]["RGJYBHGX"].ToString();
                 arrModel[N].WGJC_PD = dtTemp.Rows[N]["WGJC_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["WGJC_PD"].ToString();
                 arrModel[N].WGJCCZY = dtTemp.Rows[N]["WGJCCZY"] == DBNull.Value ? "" : dtTemp.Rows[N]["WGJCCZY"].ToString();
                 arrModel[N].WYXRD_PD = dtTemp.Rows[N]["WYXRD_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["WYXRD_PD"].ToString();
                 arrModel[N].WYXRDJYY = dtTemp.Rows[N]["WYXRDJYY"] == DBNull.Value ? "" : dtTemp.Rows[N]["WYXRDJYY"].ToString();
                 arrModel[N].ZCGZZD_PD = dtTemp.Rows[N]["ZCGZZD_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["ZCGZZD_PD"].ToString();
                 arrModel[N].ZCGZZJYY = dtTemp.Rows[N]["ZCGZZJYY"] == DBNull.Value ? "" : dtTemp.Rows[N]["ZCGZZJYY"].ToString();
                 arrModel[N].DPBJ_PD = dtTemp.Rows[N]["DPBJ_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["DPBJ_PD"].ToString();
                 arrModel[N].DPBJCZY = dtTemp.Rows[N]["DPBJCZY"] == DBNull.Value ? "" : dtTemp.Rows[N]["DPBJCZY"].ToString();
                 arrModel[N].DTDP_PD = dtTemp.Rows[N]["DTDP_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["DTDP_PD"].ToString();
                 arrModel[N].DTDPCZY = dtTemp.Rows[N]["DTDPCZY"] == DBNull.Value ? "" : dtTemp.Rows[N]["DTDPCZY"].ToString();
                 arrModel[N].CLTZCSJC_PD = dtTemp.Rows[N]["CLTZCSJC_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["CLTZCSJC_PD"].ToString();
                 arrModel[N].CLTZCSJCJYY = dtTemp.Rows[N]["CLTZCSJCJYY"] == DBNull.Value ? "" : dtTemp.Rows[N]["CLTZCSJCJYY"].ToString();
                 arrModel[N].AQZZJY_PD = dtTemp.Rows[N]["AQZZJY_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["AQZZJY_PD"].ToString();
                 arrModel[N].AQZZJYY = dtTemp.Rows[N]["AQZZJYY"] == DBNull.Value ? "" : dtTemp.Rows[N]["AQZZJYY"].ToString();
                 arrModel[N].LWCX_PD = dtTemp.Rows[N]["LWCX_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["LWCX_PD"].ToString();
                 arrModel[N].LWCXJYY = dtTemp.Rows[N]["LWCXJYY"] == DBNull.Value ? "" : dtTemp.Rows[N]["LWCXJYY"].ToString();
                 arrModel[N].DGJYBHGX = dtTemp.Rows[N]["DGJYBHGX"] == DBNull.Value ? "" : dtTemp.Rows[N]["DGJYBHGX"].ToString();
                 arrModel[N].LTHWSD = dtTemp.Rows[N]["LTHWSD"] == DBNull.Value ? "" : dtTemp.Rows[N]["LTHWSD"].ToString();
                 arrModel[N].CSYJSS = dtTemp.Rows[N]["CSYJSS"] == DBNull.Value ? "" : dtTemp.Rows[N]["CSYJSS"].ToString();
                 arrModel[N].CSBMTZ = dtTemp.Rows[N]["CSBMTZ"] == DBNull.Value ? "" : dtTemp.Rows[N]["CSBMTZ"].ToString();
                 arrModel[N].MCBL = dtTemp.Rows[N]["MCBL"] == DBNull.Value ? "" : dtTemp.Rows[N]["MCBL"].ToString();
                 arrModel[N].DCBWGDC = dtTemp.Rows[N]["DCBWGDC"] == DBNull.Value ? "" : dtTemp.Rows[N]["DCBWGDC"].ToString();
                 arrModel[N].ZXPZDZYZDL = dtTemp.Rows[N]["ZXPZDZYZDL"] == DBNull.Value ? "" : dtTemp.Rows[N]["ZXPZDZYZDL"].ToString();
                 arrModel[N].CXLBGD = dtTemp.Rows[N]["CXLBGD"] == DBNull.Value ? "" : dtTemp.Rows[N]["CXLBGD"].ToString();
                 arrModel[N].ZXPZDZYZDL_PD = dtTemp.Rows[N]["ZXPZDZYZDL_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["ZXPZDZYZDL_PD"].ToString();
                 arrModel[N].LTHWSD_PD = dtTemp.Rows[N]["LTHWSD_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["LTHWSD_PD"].ToString();
                 arrModel[N].MCBL_PD = dtTemp.Rows[N]["MCBL_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["MCBL_PD"].ToString();
                 arrModel[N].CSYJSSL_PD = dtTemp.Rows[N]["CSYJSSL_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["CSYJSSL_PD"].ToString();
                 arrModel[N].DCBWGDC_PD = dtTemp.Rows[N]["DCBWGDC_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["DCBWGDC_PD"].ToString();
                 arrModel[N].CSBMTZ_PD = dtTemp.Rows[N]["CSBMTZ_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["CSBMTZ_PD"].ToString();
                 arrModel[N].RGJYBJCX = dtTemp.Rows[N]["RGJYBJCX"] == DBNull.Value ? "" : dtTemp.Rows[N]["RGJYBJCX"].ToString();
                 arrModel[N].DGJYBJCX = dtTemp.Rows[N]["DGJYBJCX"] == DBNull.Value ? "" : dtTemp.Rows[N]["DGJYBJCX"].ToString();
                 arrModel[N].WYXRD_MS = dtTemp.Rows[N]["WYXRD_MS"] == DBNull.Value ? "" : dtTemp.Rows[N]["WYXRD_MS"].ToString();
                 arrModel[N].ZCGZZD_MS = dtTemp.Rows[N]["ZCGZZD_MS"] == DBNull.Value ? "" : dtTemp.Rows[N]["ZCGZZD_MS"].ToString();
                 arrModel[N].WGJC_MS = dtTemp.Rows[N]["WGJC_MS"] == DBNull.Value ? "" : dtTemp.Rows[N]["WGJC_MS"].ToString();
                 arrModel[N].DPBJ_MS = dtTemp.Rows[N]["DPBJ_MS"] == DBNull.Value ? "" : dtTemp.Rows[N]["DPBJ_MS"].ToString();
                 arrModel[N].YXJC_MS = dtTemp.Rows[N]["YXJC_MS"] == DBNull.Value ? "" : dtTemp.Rows[N]["YXJC_MS"].ToString();
                 arrModel[N].HCPD_MS = dtTemp.Rows[N]["HCPD_MS"] == DBNull.Value ? "" : dtTemp.Rows[N]["HCPD_MS"].ToString();
                 arrModel[N].PSZDQ_PD = dtTemp.Rows[N]["PSZDQ_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["PSZDQ_PD"].ToString();
                 arrModel[N].ZDJXZDTZZZ_PD = dtTemp.Rows[N]["ZDJXZDTZZZ_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["ZDJXZDTZZZ_PD"].ToString();
                 arrModel[N].YSKQGZHYSFLZZ_PD = dtTemp.Rows[N]["YSKQGZHYSFLZZ_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["YSKQGZHYSFLZZ_PD"].ToString();
                 arrModel[N].XSGNXXZZ_PD = dtTemp.Rows[N]["XSGNXXZZ_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["XSGNXXZZ_PD"].ToString();
                 arrModel[N].FDJCNZDMHZZ_PD = dtTemp.Rows[N]["FDJCNZDMHZZ_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["FDJCNZDMHZZ_PD"].ToString();
                 arrModel[N].HSQHQTFZZZ_PD = dtTemp.Rows[N]["HSQHQTFZZZ_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["HSQHQTFZZZ_PD"].ToString();
                 arrModel[N].ZDFBSZZ_PD = dtTemp.Rows[N]["ZDFBSZZ_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["ZDFBSZZ_PD"].ToString();
                 arrModel[N].ZWXLT_PD = dtTemp.Rows[N]["ZWXLT_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["ZWXLT_PD"].ToString();
                 arrModel[N].AQD_PD = dtTemp.Rows[N]["AQD_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["AQD_PD"].ToString();
                 arrModel[N].WXDWXTCZZD_PD = dtTemp.Rows[N]["WXDWXTCZZD_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["WXDWXTCZZD_PD"].ToString();
                 arrModel[N].YXJC_PD = dtTemp.Rows[N]["YXJC_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["YXJC_PD"].ToString();
                 arrModel[N].HCPD_PD = dtTemp.Rows[N]["HCPD_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["HCPD_PD"].ToString();
          }

          dtTemp.Dispose();

          return arrModel;
      }

      /// <summary>
      /// 得到对象集合
      /// </summary>
      public RESULT_CHASISS_MANUAL_ZJ[] GetModelList(string p_strWhere)
      {
          return GetModelList(p_strWhere, "", -1, -1);
      }

      /// <summary>
      /// 得到对象集合
      /// </summary>
      public RESULT_CHASISS_MANUAL_ZJ[] GetModelList(string p_strWhere, string p_strOrder)
      {
          return GetModelList(p_strWhere, p_strOrder, -1, -1);
      }

      /// <summary>
      /// 得到对象集合
      /// </summary>
      public RESULT_CHASISS_MANUAL_ZJ[] GetModelList(int p_intPageNumber, int p_intPageSize)
      {
          return GetModelList("", "", p_intPageNumber, p_intPageSize);
      }

      /// <summary>
      /// 得到对象集合
      /// </summary>
      public RESULT_CHASISS_MANUAL_ZJ[] GetModelList(string p_strWhere, int p_intPageNumber, int p_intPageSize)
      {
          return GetModelList(p_strWhere, "", p_intPageNumber, p_intPageSize);
      }

      /// <summary>
      /// 得到对象集合
      /// </summary>
      public RESULT_CHASISS_MANUAL_ZJ[] GetModelList()
      {
          return GetModelList("", "", -1, -1);
      }

      /// <summary>
      /// 得到对象集合
      /// </summary>
      public void GetModelList(ref DataTable p_dtData, string p_strWhere, string p_strOrder, int p_intPageNumber, int p_intPageSize)
      {
          p_dtData.Clear();

          int m_intPageNumber = p_intPageNumber;
          int m_intPageCount = GetPageCount(p_strWhere, p_intPageSize);

          if((m_intPageNumber < 1) || (m_intPageNumber == 0))
          {
              m_intPageNumber = 1;
          }

          if(m_intPageNumber == -1)
          {
              m_intPageNumber = m_intPageCount;
          }

          if(m_intPageNumber > m_intPageCount)
          {
              m_intPageNumber = m_intPageCount;
          }

          string strSql = "";
          strSql += "select * from RESULT_CHASISS_MANUAL_ZJ";
          if(p_strWhere.Trim().Length > 0)
          {
              strSql += " where " + p_strWhere;
          }
          if(p_strOrder.Trim().Length > 0)
          {
              strSql += " order by " + p_strOrder;
          }

          if(p_intPageSize > 0)
          {
              DbHelper.GetTable(strSql, ref p_dtData, (m_intPageNumber-1)*p_intPageSize, p_intPageSize);
          }
          else
          {
              DbHelper.GetTable(strSql, ref p_dtData);
          }
       }

       /// <summary>
       /// 得到对象集合
       /// </summary>
       public void GetModelList(ref DataTable p_dtData, string p_strWhere)
       {
           GetModelList(ref p_dtData, p_strWhere, "", -1, -1);
       }

       /// <summary>
       /// 得到对象集合
       /// </summary>
       public void GetModelList(ref DataTable p_dtData, string p_strWhere, string p_strOrder)
       {
           GetModelList(ref p_dtData, p_strWhere, p_strOrder, -1, -1);
       }

       /// <summary>
       /// 得到对象集合
       /// </summary>
       public void GetModelList(ref DataTable p_dtData, int p_intPageNumber, int p_intPageSize)
       {
           GetModelList(ref p_dtData, "", "", p_intPageNumber, p_intPageSize);
       }

       /// <summary>
       /// 得到对象集合
       /// </summary>
       public void GetModelList(ref DataTable p_dtData, string p_strWhere, int p_intPageNumber, int p_intPageSize)
       {
           GetModelList(ref p_dtData, p_strWhere, "", p_intPageNumber, p_intPageSize);
       }
       /// <summary>
       /// 得到对象集合
       /// </summary>
       public void GetModelList(ref DataTable p_dtData)
       {
           GetModelList(ref p_dtData, "", "", -1, -1);
       }
   }
}
